package com.hgt.cloudAlibaba.service.impl;

import com.hgt.cloudAlibaba.dao.StorageDao;
import com.hgt.cloudAlibaba.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author HuangGaoTao 929507053@qq.com
 * @Created: 2021/7/21 22:49
 */
@Service
@Slf4j
public class StorageServiceImpl implements StorageService{

    @Autowired
    private StorageDao storageDao;

    //扣减库存
    @Override
    public void decrease(Long productId, Integer count) {
      log.info("----------------------------》storage-service中扣减库存开始");
      storageDao.decrease(productId,count);
      log.info("----------------------------》storage-service中扣减库存结束");
    }
}
